#docker rmi -f mobz/elasticsearch-head:5-alpine
docker pull mobz/elasticsearch-head:5-alpine
rm -rf /cardone/docker/images/mobz/elasticsearch-head_5-alpine.tar
mkdir -p /cardone/docker/images/mobz
docker save mobz/elasticsearch-head:5-alpine > /cardone/docker/images/mobz/elasticsearch-head_5-alpine.tar
#docker load < /cardone/docker/images/mobz/elasticsearch-head_5-alpine.tar


docker node update --label-rm cardone-elasticsearch-head_elasticsearch-head cardone-01-01
docker node update --label-add cardone-elasticsearch-head_elasticsearch-head=true cardone-01-01

docker stack rm cardone-elasticsearch-head

docker stack deploy -c /cardone/middlewares/elasticsearch-head/prod.yml cardone-elasticsearch-head

for i in {1..10}  
do  
sleep $i

docker stack ps cardone-elasticsearch-head

docker service ls
done

docker service logs cardone-elasticsearch-head_elasticsearch-head -f --tail 300
